home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2263 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.5 KB

  1. Path: rover.ucs.ualberta.ca!mcbride
  2. From: mcbride@ee.ualberta.ca (Darin McBride)
  3. Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel
  4. Subject: Re: Hungarian notation
  5. Followup-To: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel
  6. Date: 16 Jan 1996 20:03:44 GMT
  7. Organization: University of Alberta Electrical Engineering Department
  8. Message-ID: <4dh0b0$10si@pulp.ucs.ualberta.ca>
  9. References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4bd3ga$80a@beatty.slip.netcom.com> <dewar.819643725@schonberg> <4bhe6u$adq@beatty.slip.netcom.com> <dewar.819838019@schonberg> <4bv1ce$co1@ixnews4.ix.netcom.com>
  10. NNTP-Posting-Host: hp02.ee.ualberta.ca
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Timothy J. Halloran (halloran@ix.netcom.com) wrote:
  14. > dewar@cs.nyu.edu (Robert Dewar) wrote:
  15.  
  16. > I agree.  For another viewpoint consider what Steve McConnell writes
  17. > on pg 206 of "Code Complete":
  18.  
  19. > "Some of the versions of Hungarian that are in wide circulation
  20. > virtually ignore the use of abstract data types as base types.
  21. > Instead, they set up base types based on programming-language
  22. > integers, long integers, floating-point numbers, and strings.  The
  23. > result is a convention of little value, one that forces programmers to
  24. > worry about manual type checking instead of letting the compiler check
  25. > the types more rapidly and accurately."
  26.  
  27. Well, first, as a disclaimer, we used adt's (classes, structs, etc.) as
  28. base types.  But we still found use in using the 'm_lLongVar' style
  29. since we had to use sprintf alot (in real-time data-gathering, sometimes
  30. the overhead of strstream was prohibitive).  So was that a %d, %u, %ld,
  31. %lu... or %s?  Our variables told us without having to go back to the
  32. header file for that class to look which type that member variable was.
  33. Possibly if we were using streams exclusively, we could have ignored
  34. types and let the compiler do the work (which is what we paid $600CDN
  35. per copy for anyway!).
  36.  
  37. I guess it depends on the environment you're in.  :-)
  38.  
  39. --
  40. Darin McBride:mcbride@ee.ualberta.ca/mcbride@tower.bohica.net
  41.  
  42. Enjoy each day as if it were your last, care about each moment as if
  43. it were your last for one day, one moment, you *will* be right!
  44.  
  45. Tips & Tricks for IBM Hardware, MSDOS, OS2, Windows (including Win'95):
  46.     http://www.ee.ualberta.ca/~mcbride/tiptrick.html
  47.